Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Socket
Sign inDemoInstall

react-activity

Package Overview
Dependencies
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-activity

Activity indicator component library for React applications.


Version published
Weekly downloads
4.5K
decreased by-0.09%
Maintainers
1
Weekly downloads
 
Created
Source

React Activity Indicators

Build Status NPM Downloads

A library of activity indicators in the form of React components.

preview

Demo & Examples

Live demo: http://labs.lukevella.com/react-activity

To run the examples locally, run:

npm install
npm start

Then open localhost:8000 in your browser.

Install

npm install react-activity

React, ReactDOM are peer dependencies, if you haven't already installed them use:

npm install react react-dom

Getting Started

Import the activity indicators you would like to use along with the css file. Use the activity indicator component like you would any other component.

import React, { Component } from 'react';
import { render } from 'react-dom';
import { Dots } from 'react-activity';
import 'react-activity/dist/react-activity.css';

class App extends Component {
  render() {
    return <Dots />;
  }
}

render(<App />, document.getElementById('app-container'))

Optimizing Your Build

To avoid bundling unnecessary code and css to your project, you can import the activity indicators individually.

import React, { Component } from 'react';
import { render } from 'react-dom';
import Dots from 'react-activity/lib/Dots';
import 'react-activity/lib/Dots/Dots.css';

class App extends Component {
  render() {
    return <Dots />;
  }
}

render(<App />, document.getElementById('app-container'))

Activity Indicators

  • Dots
  • Levels
  • Sentry
  • Spinner
  • Squares
  • Digital
  • Bounce
  • Windmill

Properties

  • size: number All dimensions of the activity indicators are specified in ems so play around with a value until you find something that suits your needs.
  • color: string The active color of the indicator.
  • speed: number (Default: 1) The relative animation speed of the indicator.
  • animating: boolean (Default: true) Whether to show the indicator (true) or hide it (false).

License

See LICENSE file.

Keywords

FAQs

Package last updated on 24 Mar 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc